import java.util.Arrays;

public class 冒泡排序 {
    public static void main(String args[]){
        int a[] = new int[]{1,5,9,3,2,4,5,8,6,3,10,56,12,122,43,84};
        for(int i = 0;i<a.length-1;i++){
            for(int j = 0;j<a.length-i-1;j++){
                if(a[j]>a[j+1]){
                    int temp = a[j];
                    a[j] = a[j+1];
                    a[j+1]=temp;
                }
            }
        }
        System.out.println(Arrays.toString(a));n
    }

}
